package cn.hxzy.ownerSource.mapper;

import cn.hxzy.entity.sourceEntity.SourceList;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;
import org.hibernate.validator.constraints.SafeHtml;
import org.springframework.stereotype.Repository;

import java.util.List;

/**
 * <p>
 *  Mapper 接口
 * </p>
 *
 * @author ao.Li
 * @since 2023-06-23
 */
@Repository
public interface SourceListMapper extends BaseMapper<SourceList> {
    @Select("SELECT * FROM tt_source_list WHERE loading_site_id='${loadingSiteId}'")
    List<SourceList> selectByLoading(@Param("loadingSiteId") String loadingSiteId );
    @Select("SELECT * FROM tt_source_list WHERE unloading_site_id='${unloadingSiteId}'")
    List<SourceList> selectByUnLoading(@Param("unloadingSiteId") String unloadingSiteId);
    @Select("SELECT * FROM tt_source_list WHERE loading_site_id='${loadingSiteId}' AND unloading_site_id='${unloadingSiteId}'")
    List<SourceList> selectByLoadingAndUn(@Param("loadingSiteId") String loadingSiteId,@Param("unloadingSiteId") String unloadingSiteId);
}
